<template>
  <div class="alsrtInfo" :style="{ display: displayStsates }">
    <div class="profPrompt_test">{{ aletMsg }}</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      aletMsg: '', // 弹出框中的提示语
      displayStsates: 'none',
    }
  },
  methods: {
    alertDia(msg) {
      this.displayStsates = 'block'
      this.aletMsg = msg
      // 延迟2秒后消失 自己可以更改时间
      window.setTimeout(() => {
        this.displayStsates = 'none'
      }, 2000)
    },
  },
}
</script>

<style lang="scss" scoped>
@import '../assets/sass/mixin.scss';
@import '../assets/sass/reset.scss';
@import '../assets/sass/_variable.scss';
.alsrtInfo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.1);
  .profPrompt_test {
    padding: rem(30) rem(10);
    // width: rem(480);
    overflow: hidden;
    line-height: rem(28);
    border: rem(1) solid #4eb6d3;
    color: #4eb6d3;
    position: absolute;
    background-color: #fbfbfb;
    top: 50%;
    left: 50%;
    font-size: rem(10);
    // font-family: Gotham-Book;
    opacity: 1;
    z-index: 999;
    text-align: center;
    transform: translate(-50%, -50%);
  }
}
</style>
